package com.cntcdt.api.db.model.base;

import java.io.Serializable;
import java.sql.ResultSet;
import java.util.Date;

import com.cntcdt.api.utils.EmojiEncodeUtils;

/**
 * 这是cdt_check_history的数据传输对象基类,直接与表对应<br>
 */
public abstract class CheckHistoryModelBase  implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 属性:id<br>
     */
    private Integer id ;
    
    private String cdb ;
    /**
     * 属性:userId<br>
     */
    private Integer userId ;
    /**
     * 属性:1表示借入 2表示归还 3表转接别人<br>
     * 含义:1表示借入 2表示归还 3表转接别人<br>
     */
    private Integer type ;
    /**
     * 属性:把充电宝转接的目标用户<br>
     * 含义:把充电宝转接的目标用户<br>
     */
    private Integer toUserId ;
    /**
     * 属性:0表示借入者没有留言 1表示有留言<br>
     * 含义:0表示借入者没有留言 1表示有留言<br>
     */
    private Integer status ;
    /**
     * 属性:用户留言<br>
     * 含义:用户留言<br>
     */
    private String message ;
    /**
     * 属性:addTime<br>
     */
    private Date addTime ;
    /**
     * 属性:updateTime<br>
     */
    private Date updateTime ;

    private Long sortTime;
    
    private Integer shopId;
    
    private String deviceTerminal;
    
    private Long expires;
    
    private Integer taskId;
    
    private Integer sourceUserId;
    
    private String name;
    
    private Date returnTime;
    
    private Double preMoney;//预付款
    
    private Double overtimeMoney;//超时之后产生的费用
    
    private int pushHour;
    
    private int giveBackShopId;
    
    private Integer userIdOld;
    
    private Double factOvertimeMoney;
    
    private Integer consumeFreeTime;
    
    private Integer deviceChargeId;
    
    private Double prePresentMoney;
    
    private Integer isUseTicket;
    
    private Double divideFactOvertimeMoney;
    
    private Integer isPaymentCard;
    
    private Double reauthorizePaymentMoney;
    
    private Integer paypalOrderId;
    
    private Long userNumberAccount;
    
    private Integer isPersonnelReturn;
    
    /**
     *  默认构造方法,构造一个默认的CheckHistoryModelBase对象
     */
    public CheckHistoryModelBase(){
    }

    /**
     *  构造函数
     *  @param rs 数据库查询结果集
     */
    public CheckHistoryModelBase(ResultSet rs){
           try{
               this.id = rs.getInt("id");
               this.cdb = rs.getString("cdb");
               this.userId = rs.getInt("userId");
               this.type = rs.getInt("type");
               this.toUserId = rs.getInt("toUserId");
               this.status = rs.getInt("status");
               this.message = rs.getString("message");
               this.addTime = rs.getDate("addTime");
               this.updateTime = rs.getDate("updateTime");
               this.sortTime = rs.getLong("sortTime");
               this.shopId = rs.getInt("shopId");
               this.deviceTerminal = rs.getString("deviceTerminal");
               this.expires = rs.getLong("expires");
               this.taskId = rs.getInt("taskId");
               this.sourceUserId = rs.getInt("sourceUserId");
               this.name = rs.getString("name");
               this.returnTime = rs.getDate("returnTime");
               this.preMoney = rs.getDouble("preMoney");
               this.overtimeMoney = rs.getDouble("overtimeMoney");
               this.pushHour = rs.getInt("pushHour");
               this.giveBackShopId = rs.getInt("giveBackShopId");
               this.userIdOld = rs.getInt("userIdOld");
               this.factOvertimeMoney = rs.getDouble("factOvertimeMoney");
               this.consumeFreeTime = rs.getInt("consumeFreeTime");
               this.deviceChargeId = rs.getInt("deviceChargeId");
               this.prePresentMoney = rs.getDouble("prePresentMoney");
               this.isUseTicket = rs.getInt("isUseTicket");
               this.isPaymentCard = rs.getInt("isPaymentCard");
               this.reauthorizePaymentMoney = rs.getDouble("reauthorizePaymentMoney");
               this.paypalOrderId = rs.getInt("paypalOrderId");
           }catch(Exception e) {
              e.printStackTrace(); 
           }
    }
    
    public Integer getIsPersonnelReturn() {
		return isPersonnelReturn;
	}

	public void setIsPersonnelReturn(Integer isPersonnelReturn) {
		this.isPersonnelReturn = isPersonnelReturn;
	}

	public Long getUserNumberAccount() {
		return userNumberAccount;
	}

	public void setUserNumberAccount(Long userNumberAccount) {
		this.userNumberAccount = userNumberAccount;
	}

	public Integer getPaypalOrderId() {
		return paypalOrderId;
	}

	public void setPaypalOrderId(Integer paypalOrderId) {
		this.paypalOrderId = paypalOrderId;
	}

	public Integer getIsPaymentCard() {
		return isPaymentCard;
	}

	public void setIsPaymentCard(Integer isPaymentCard) {
		this.isPaymentCard = isPaymentCard;
	}

	public Double getReauthorizePaymentMoney() {
		return reauthorizePaymentMoney;
	}

	public void setReauthorizePaymentMoney(Double reauthorizePaymentMoney) {
		this.reauthorizePaymentMoney = reauthorizePaymentMoney;
	}

	public Double getDivideFactOvertimeMoney() {
		return divideFactOvertimeMoney;
	}

	public void setDivideFactOvertimeMoney(Double divideFactOvertimeMoney) {
		this.divideFactOvertimeMoney = divideFactOvertimeMoney;
	}

	public Integer getIsUseTicket() {
		return isUseTicket;
	}

	public void setIsUseTicket(Integer isUseTicket) {
		this.isUseTicket = isUseTicket;
	}

	public Double getPrePresentMoney() {
		return prePresentMoney;
	}

	public void setPrePresentMoney(Double prePresentMoney) {
		this.prePresentMoney = prePresentMoney;
	}

	public Integer getDeviceChargeId() {
		return deviceChargeId;
	}

	public void setDeviceChargeId(Integer deviceChargeId) {
		this.deviceChargeId = deviceChargeId;
	}

	public Integer getConsumeFreeTime() {
		return consumeFreeTime;
	}

	public void setConsumeFreeTime(Integer consumeFreeTime) {
		this.consumeFreeTime = consumeFreeTime;
	}

	public Double getFactOvertimeMoney() {
		return factOvertimeMoney;
	}

	public void setFactOvertimeMoney(Double factOvertimeMoney) {
		this.factOvertimeMoney = factOvertimeMoney;
	}

	/**
     * 设置属性id<br>
     * @param id 待设置的属性id的值
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取属性id<br>
     * @return 属性id的值
     */
    public Integer getId() {
        return id;
    }


    /**
     * 设置属性userId<br>
     * @param userId 待设置的属性userId的值
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 获取属性userId<br>
     * @return 属性userId的值
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 设置属性1表示借入 2表示归还 3表转接别人<br>
     * 含义:1表示借入 2表示归还 3表转接别人<br>
     * @param type 待设置的属性1表示借入 2表示归还 3表转接别人的值
     */
    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * 获取属性1表示借入 2表示归还 3表转接别人<br>
     * 含义:1表示借入 2表示归还 3表转接别人<br>
     * @return 属性1表示借入 2表示归还 3表转接别人的值
     */
    public Integer getType() {
        return type;
    }

    /**
     * 设置属性把充电宝转接的目标用户<br>
     * 含义:把充电宝转接的目标用户<br>
     * @param toUserId 待设置的属性把充电宝转接的目标用户的值
     */
    public void setToUserId(Integer toUserId) {
        this.toUserId = toUserId;
    }

    /**
     * 获取属性把充电宝转接的目标用户<br>
     * 含义:把充电宝转接的目标用户<br>
     * @return 属性把充电宝转接的目标用户的值
     */
    public Integer getToUserId() {
        return toUserId;
    }

    /**
     * 设置属性0表示借入者没有留言 1表示有留言<br>
     * 含义:0表示借入者没有留言 1表示有留言<br>
     * @param status 待设置的属性0表示借入者没有留言 1表示有留言的值
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 获取属性0表示借入者没有留言 1表示有留言<br>
     * 含义:0表示借入者没有留言 1表示有留言<br>
     * @return 属性0表示借入者没有留言 1表示有留言的值
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置属性用户留言<br>
     * 含义:用户留言<br>
     * @param message 待设置的属性用户留言的值
     */
    public void setMessage(String message) {
        this.message = message;
    }

    /**
     * 获取属性用户留言<br>
     * 含义:用户留言<br>
     * @return 属性用户留言的值
     */
    public String getMessage() {
        return message;
    }

    /**
     * 设置属性addTime<br>
     * @param addTime 待设置的属性addTime的值
     */
    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    /**
     * 获取属性addTime<br>
     * @return 属性addTime的值
     */
    public Date getAddTime() {
        return addTime;
    }

    /**
     * 设置属性updateTime<br>
     * @param updateTime 待设置的属性updateTime的值
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取属性updateTime<br>
     * @return 属性updateTime的值
     */
    public Date getUpdateTime() {
        return updateTime;
    }


    public Long getSortTime() {
		return sortTime;
	}

	public void setSortTime(Long sortTime) {
		this.sortTime = sortTime;
	}

	public Integer getShopId() {
		return shopId;
	}

	public void setShopId(Integer shopId) {
		this.shopId = shopId;
	}

	public Long getExpires() {
		return expires;
	}

	public void setExpires(Long expires) {
		this.expires = expires;
	}

	public String getCdb() {
		return cdb;
	}

	public void setCdb(String cdb) {
		this.cdb = cdb;
	}


	public String getDeviceTerminal() {
		return deviceTerminal;
	}

	public void setDeviceTerminal(String deviceTerminal) {
		this.deviceTerminal = deviceTerminal;
	}

	/**
     * 比较两个对象在逻辑上是否相等
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof CheckHistoryModelBase)) {
            return false;
        }

        final CheckHistoryModelBase otherModel = (CheckHistoryModelBase) other;
        if (getId()!=null && !getId().equals(otherModel.getId())) {
            return false;
        }
        return true;
    }

    public Integer getTaskId() {
		return taskId;
	}

	public void setTaskId(Integer taskId) {
		this.taskId = taskId;
	}

	/**
     * 根据主键生成HashCode
     * @see java.lang.Object#hashCode()
     */
    public int hashCode() {
        StringBuffer buffer = new StringBuffer();
        buffer.append('|').append(id);
        return buffer.toString().hashCode();
    }

	public Integer getSourceUserId() {
		return sourceUserId;
	}

	public void setSourceUserId(Integer sourceUserId) {
		this.sourceUserId = sourceUserId;
	}

	public String getName() {
		return EmojiEncodeUtils.filter2CharUTF(name);
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getReturnTime() {
		return returnTime;
	}

	public void setReturnTime(Date returnTime) {
		this.returnTime = returnTime;
	}

	public Double getPreMoney() {
		return preMoney;
	}

	public void setPreMoney(Double preMoney) {
		this.preMoney = preMoney;
	}

	public Double getOvertimeMoney() {
		return overtimeMoney;
	}

	public void setOvertimeMoney(Double overtimeMoney) {
		this.overtimeMoney = overtimeMoney;
	}

	public int getPushHour() {
		return pushHour;
	}

	public void setPushHour(int pushHour) {
		this.pushHour = pushHour;
	}

	public int getGiveBackShopId() {
		return giveBackShopId;
	}

	public void setGiveBackShopId(int giveBackShopId) {
		this.giveBackShopId = giveBackShopId;
	}

	public Integer getUserIdOld() {
		return userIdOld;
	}

	public void setUserIdOld(Integer userIdOld) {
		this.userIdOld = userIdOld;
	}


}
